<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>生成模拟身份证，加速核酸检测身份录入，为战疫加油！</title>
    <meta name="description" content="核酸检测时，将儿童等无身份证人员的信息提前生成照片，方便医护人员扫描快速录入信息。大大缩短核酸检测时间，为战胜疫情尽一份力。">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.png">
    <link type="text/css" rel="stylesheet" href="styles.css">
    <!-- baidu analytics codes -->
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?fc3bac3eb3c24cac8197dc149cb153f9";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>

<body>
    <div id="input-info">
        <div class="container">
            <div>
                <div class="banner">*生成模拟身份证，针对儿童等无证人员，加速核酸检测信息录入，为战疫加油*</div>
            </div>
            <div class="title">填写信息，生成模拟身份证</div>
            <form class="personal-info-form">
                <div class="info-edit">
                    <div class="section">
                        <div class="section-title">身份证号</div>
                        <input id="idNumber" type="tel" placeholder="输入身份证号" maxlength="18"
                            onkeydown="idNumberChange()" />
                        <div class="id-number-stat">身份证号长18位，已输入：<span id="idNumberLen">0</span></div>
                    </div>
                    <div class="section">
                        <div class="section-title">姓名</div>
                        <input id="name" type="text" placeholder="输入姓名" />
                    </div>
                    <div class="section">
                        <div class="section-title">性别</div>
                        <div>
                            <input type="radio" id="male" name="gender" value="male" checked>
                            <label for="male">男</label>
                            <input type="radio" id="female" name="gender" value="female">
                            <label for="female">女</label>
                        </div>
                    </div>
                    <div class="section">
                        <div class="section-title">民族</div>
                        <input id="nation" type="text" minlength="1" maxlength="5" placeholder="例如：汉族" value="汉族">
                    </div>
                    <div class="section">
                        <div class="section-title">出生年月</div>
                        <input id="birthYear" type="number" placeholder="年" min="1920" max="2025" value="2020">
                        <span>-</span>
                        <input id="birthMonth" type="number" placeholder="月" min="1" max="12" value="01">
                        <span>-</span>
                        <input id="birthDay" type="number" placeholder="日" min="1" maxlength="31" value="01">
                    </div>
                    <div class="section">
                        <div class="section-title">住址</div>
                        <textarea id="address" class="address-input" placeholder="xx省xx市xx区..." rows="4"></textarea>
                    </div>
                </div>

                <div>
                    <div class="tip">* 生成的身份证照片可用于核酸检测时录入信息，针对儿童等无证人员实现快速扫描录入</div>
                    <div class="tip">* <span
                            class="decalre-label">隐私申明</span>：本程序不会收集、存储您的任何身份信息，所填信息仅在本地用于生成模拟图片。点击查看<a
                            href="https://gitee.com/andyspider/idmoni">程序源代码</a>。</div>
                </div>

                <div class="button-group">
                    <button type="button" class="submit-btn" onclick="genIdCard()">点击生成</button>
                    <button type="button" class="reset-btn" onclick="resetInputInfo()">重置信息</button>
                </div>
            </form>

        </div>
    </div>

    <div id="gen-idcard">
        <div class="container">
            <div>
                <div class="banner">*核酸检测时，请将该页面提供给医生扫描*</div>
                <div class="banner sub-banner">（建议截图保存）</div>
            </div>
            <div class="id-display">
                <img class="id-template" src="id_template.png" />
                <div class="id-mask">
                    <div id="name2" class="name"></div>
                    <div id="gender2" class="gender"></div>
                    <div id="nation2" class="nation"></div>
                    <div id="birthYear2" class="birth-year"></div>
                    <div id="birthMonth2" class="birth-month"></div>
                    <div id="birthDay2" class="birth-day"></div>
                    <div id="address2" class="address"></div>
                    <div id="idNumber2" class="number"></div>
                </div>
            </div>

            <div class="footnote">
                <div class="declare">声明：该身份证图片是根据用户输入模拟生成，仅供疫情期间录入信息使用，本程序不保证信息的准确性，请检验无误后再使用</div>
            </div>

            <button class="refill-btn" onclick="goBackToInput()">返回重填</button>
        </div>
    </div>

    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script type="text/javascript" src="main.js"></script>
</body>

</html>